package com.aididi.config;

import com.aliyun.oss.OSSClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author ：xuzexiang
 * @description：Oss连接配置
 * @date ： 2021/11/8 10:16
 */
@Configuration
public class OssConfig {

    @Autowired
    private OSSProperties ossProperties;

    @Bean
    public OSSClient ossClient(){
        return new OSSClient(ossProperties.getEndpoint(),ossProperties.getAccessKeyId(),ossProperties.getAccessKeySecret());
    }

}
